Methods and apparatus for real-time traffic steering using real-time user monitoring data

ABSTRACT

Conventional internet routing is handled using routing protocols such as the Border Gateway Protocol (BGP). However, simple BGP does not account for latency, packet loss, or cost. To address this problem, smart routing systems that route traffic fast and in a cost-effective manner are implemented. In one approach, smart routing systems measure, compare, and analyze round-trip latencies and other metrics between a customer premises and one or more endpoints. Optimal inbound and outbound transit providers are selected for each endpoint based on these measurements. Other smart routing systems collect and analyze Real User Monitoring (RUM) data to predict latency performance of different content origins for serving data to a particular client based on the client&#39;s IP address and the content origins&#39; IP addresses, which are ranked by performance. These rankings are used to steer traffic along lower latency paths by resolving Domain Name System (DNS) queries based on the performance associated with the IP addresses.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application claims the priority benefit, under 35 U.S.C. § 119(e),of U.S. Application No. 62/214,814, entitled “Methods and Apparatus forReal-time Traffic Steering and Real-User Monitoring Data,” filed on Sep.4, 2015, and to International Application No. PCT/US2016/050429,entitled “METHODS AND APPARATUS FOR REAL-TIME TRAFFIC STEERING USINGREAL-TIME USER MONITORING DATA”, filed on Sep. 6, 2016, the disclosureof which incorporated herein by reference in its entirety.

BACKGROUND

Path selection on the Internet relies heavily on the Border GatewayProtocol (BGP). BGP is a standardized, scalable protocol that allowscommunication between autonomous systems across the Internet. BGPchooses paths between endpoints using a set of deterministic rules andis classified as a distance-vector routing protocol.

BGP considers neither latency, packet loss, nor cost when selecting apath between a pair of endpoints. As a result, in some circuits, latencycan be unacceptably low. In others, there can be high levels of packetloss which can render communication less efficient and effectivelyincrease latency. Finally, BGP is blind to business considerations thattransit providers may care about including cost and preferred transitproviders.

Currently, some approaches exist to optimize the first hop in a BGProute. Router-specific solutions include IP-SLA from Cisco and Juniper'sRPM solutions. Other approaches are either hardware-specific (Noction)or reside at the level of transit provider (Internap) assess trafficflows globally and modify BGP tables accordingly.

At present, there is no holistic or comprehensive solution that isrelatively router independent and can integrate an unlimited number ofinputs to help determine path choice. Moreover, no solution currentlyconsiders or controls return path without having assets on targetservers.

The Domain Name System (DNS) can map a logical endpoint/address inInternet Protocol (IP) space from a text-based domain name. When atarget needs to be reached, there are methods that allow choice oftarget based on source geolocation.

However, due to the vagaries of the Internet, target availability fromdifferent sources can vary: servers can be overwhelmed, paths can becongested or unavailable. Thus, methods must be in place to determinebest target location for a given user or market, in real-time.

SUMMARY

The present technology addresses problems associated with path selectionand target choice determination for routing on the internet, among otherproblems. Embodiments of this technology includes methods and apparatusfor directing traffic from a customer premises to an Internet Protocol(IP) address among a plurality of transit providers. The system includesa collector device at the customer premises that measures a firstlatency to the IP address via a first transit provider in the pluralityof transit providers and a second latency from the collector device tothe IP address via a second transit provider in the plurality of transitproviders. A decision engine coupled to or implemented by the collectordevice performs a comparison of the first and second latencies andselects the first or second transit provider based on the comparison. Arouter, switch, or other device directs traffic from the customerpremises to the IP address via the selected transit provider.

In some cases, the collector device measures the first latency bytransmitting an echo request to the IP address via the first transitprovider and receiving an echo reply via the second transit provider.The collector device may also measure the first latency by transmittingan echo request to the IP address via a first interface of a borderrouter coupled to the first transit provider and receiving an echo replyvia a second interface of the border router. The collector device canmeasure the first latency via a first border router coupled to the firsttransit provider and measure the second latency via a second borderrouter coupled to the first border router and to the second transitprovider. In this case, the router may direct the traffic to the secondtransit provider via the first border router and the second borderrouter. And the collector device can measure the first latency via afirst interface on a border router coupled to the first transit providerand the second transit provider and measure the second latency via asecond interface on the border router. In this case, the router maydirect the traffic to the second transit provider via the first borderrouter and the second border router.

The decision engine may perform the comparison of the first latency andthe second latency by comparing an inbound latency of the first transitprovider to an inbound latency of the second transit provider. Thedecision engine may also compare an outbound latency of the firsttransit provider to an outbound latency of the second transit provider.

The decision engine may select the first or second transit providerfurther based on a cost of the first transit provider and a cost of thesecond transit provider. The decision engine may also select the firstor second transit provider based on a packet loss of the first transitprovider and a packet loss of the second transit provider.

The router, switch, or other routing device may direct the traffic tothe IP address by associating a host prefix of a packet with a BorderGateway Protocol (BGP) community attribute and directing the packet tothe selected transit provider based on the BGP community attribute. Therouter, switch, or other device may also direct the traffic to the IPaddress by setting a next hop for traffic destined to the IP address tobe a border router coupled to the one of the first transit provider andthe second transit provider.

Other embodiments of the present technology include methods and systemsfor measuring latency between a target IP address and a customerpremises containing a first router that announces a first prefix and isconnected to a first transit provider and a second router that announcesa second prefix and is connected to a second transit provider. Acollection server at the customer premises transmits a first echorequest from a first IP address having the first prefix to the target IPaddress via the second router and the second transit provider. The firstecho request comprises a first timestamp indicating when the first echorequest was transmitted by the first IP address. The collection serverreceives a first echo reply from the target IP address via the firsttransit provider and the first transit provider. The first echo replycomprises a first timestamp reply indicating when the first echo replywas transmitted by the target IP address. A decision engine coupled toor implemented by the collection server determines a first round-triplatency based on the first timestamp and the first timestamp reply.

In some cases, the collection server also transmits a second echorequest from a second IP address at the customer premises to the targetIP address via the first router and the first transit provider. This thesecond echo request comprises a second timestamp indicating when thesecond echo request was transmitted by the second IP address, which hasthe second prefix. The collection server receives a second echo replyfrom the target IP address via the second transit provider and thesecond transit provider. The second echo reply comprises a secondtimestamp reply indicating when the second echo reply was transmitted bythe target IP address.

In these cases, the decision engine determines a second round-triplatency based on the second timestamp and the second timestamp reply. Itmay also perform a comparison of the first latency and the secondlatency and select the first or second transit provider based on thecomparison of the first latency and the second latency. A router,switch, or other routing device coupled to the decision engine directstraffic from the customer premises to the IP address via the selectedtransit provider.

Still other embodiments of the present technology include systems andmethods for responding to a Domain Name System (DNS) request. An examplemethod comprises receiving a DNS request from a recursive resolver toresolve a domain that has content stored at each of a plurality ofcontent origins, which may provide content from a content deliverynetwork (CDN) or cloud provider. In response to the DNS request, anauthoritative DNS server or other processor selects a set of IPaddresses from a hierarchy of IP addresses. This set of IP addressescontains the IP address of the recursive resolver and at least apredetermined number of samples. The authoritative DNS server selects acontent origin from the plurality of content origins based (i) on theset of IP addresses and (ii) a ranking of content origins in theplurality of content origins associated with the set of IP addresses.The authoritative DNS server sends an IP address of the selected contentorigin to the recursive resolver.

Yet another embodiment of the present technology includes a method ofmonitoring a download by a client in real time. In one example, software(executable code) executed by the client causes the client to identifyan IP address of a recursive resolver in a plurality of recursiveresolvers used to resolve a Domain Name System (DNS) request for acontent delivery network (CDN). The client measures a resolution timefor resolving the DNS request, identifies a uniform resource locator(URL) of the CDN returned by the recursive resolver in response to theDNS request, and measures a download time for downloading content fromthe content origin to the client. The client may download and executethis software in response to a request for the content from the client.

The client may measure identify the recursive resolver's IP address,measure the DNS resolution time, identify the URL, and measure thedownload time for downloads from each of a plurality of CDNs. The clientor another processor (e.g., an authoritative DNS server) may perform acomparison of the resolution times and the download times for theplurality of CDNs. For instance, the CDNs may be ranked for eachrecursive resolver based on the resolution times and the download timesfor that recursive resolver. The recursive resolver may use thiscomparison to respond to a subsequent DNS request.

It should be appreciated that all combinations of the foregoing conceptsand additional concepts discussed in greater detail below (provided suchconcepts are not mutually inconsistent) are contemplated as being partof the inventive subject matter disclosed herein. In particular, allcombinations of claimed subject matter appearing at the end of thisdisclosure are contemplated as being part of the inventive subjectmatter disclosed herein. It should also be appreciated that terminologyexplicitly employed herein that also may appear in any disclosureincorporated by reference should be accorded a meaning most consistentwith the particular concepts disclosed herein.

BRIEF DESCRIPTION OF THE DRAWINGS

The skilled artisan will understand that the drawings primarily are forillustrative purposes and are not intended to limit the scope of theinventive subject matter described herein. The drawings are notnecessarily to scale; in some instances, various aspects of theinventive subject matter disclosed herein may be shown exaggerated orenlarged in the drawings to facilitate an understanding of differentfeatures. In the drawings, like reference characters generally refer tolike features (e.g., functionally similar and/or structurally similarelements).

FIG. 1A show a system that monitors and measures latencies along inboundand outbound paths provided by different transit providers between acustomer premises and a target Internet Protocol (IP) address.

FIG. 1B is a matrix comparison of latencies for the different inboundand outbound paths shown in FIG. 1A.

FIG. 2 shows a process for steering traffic to an endpoint via byselecting a transit provider based on latency measurements.

FIG. 3 shows a process for measuring round trip latencies between a pairof IP addresses via different transit providers.

FIG. 4 shows a process for selecting inbound and outbound transitproviders based on round-trip latencies between a pair of IP addresses.

FIG. 5A illustrates a network in which a route-map is applied to borderrouter interfaces for monitoring latency between a collector and severaltarget IP addresses.

FIG. 5B illustrates steering traffic in a network, manually, between thecollector and several target IP addresses via static routes.

FIG. 5C illustrates steering traffic by dynamically associating BGPcommunity attributes with different transit providers based on themeasured latencies of the transit providers.

FIG. 6 is a flow diagram depicting a process for creating and applyingroute maps to border router interfaces for latency and packet lossmonitoring.

FIG. 7 is a flow diagram depicting policy-based static routing to steertraffic based on latency measurements.

FIG. 8 is a flow diagram depicting automated overwriting to steertraffic based on latency measurements.

FIG. 9 illustrates a system for collecting Real-time User Monitoring(RUM) data and steering traffic based on RUM data and TYped Labeled IPSet (TYLIPS) data.

FIGS. 10 and 11 show processes for collecting and aggregating RUM data.

FIG. 12 shows a histogram formed by aggregating RUM data according tothe processes shown in FIGS. 10 and 11.

FIG. 13 shows a process for generating histograms like the one shown inFIG. 12.

FIGS. 14A and 14B show Venn diagrams that illustrate differenthierarchies for choosing TYLIPS data to resolve DNS requests.

FIG. 15 shows an exemplary rankings for client IP addresses based on RUMdata.

FIG. 16 shows a process for steering traffic based on RUM data.

DETAILED DESCRIPTION

Smart Routing between Fixed Endpoints Based on Latency, Packet Loss, andCost

Packets are routed on the internet according to the Border GatewayProtocol (BGP), which uses rules and tables to determine the “next hop”on a packet's route to a given destination. Unfortunately, simple BGPdoes not account for latency, packet loss, or cost when routing packets.This can result in sub-optimal routing for applications where lowlatency is desirable, such as real-time bidding for internet advertisinginventory sold on a per-impression basis. With real-time bidding,advertising buyers bid on an impression triggered by a user visiting apublisher's site. If a buyer wins the auction, the buyer's ad isinstantly displayed on the publisher's site. Because the auction happensin real-time in response to the user's visit to the publisher's site, itlasts for a very short time, so bidding quickly is imperative. If abuyer's bid doesn't reach the auctioneer until after the auction is over(e.g., due to latency in transmission of the bid from the buyer to theauctioneer), then the buyer is guaranteed to lose the auction.

Fortunately, the smart routing systems and methods disclosed herein canmeasure latency between two endpoints (e.g., the buyer's IP address andthe auctioneer's IP address) and select the lowest latency route betweenthose endpoints. In many cases, these routes are provided by differenttransit providers, and a decision engine or smart route transmit thepacket to the destination IP address via the transit provider offeringthe route with the lowest available latency. In some cases, the decisionengine may select the transit provider based on a user-configurable,weighted combination of latency and other factors, such as cost andpacket loss for each transit provider. This intelligent choice oftransit providers, effectively overriding BGP policy. As the transitproviders' relative latencies, packet losses, and costs change, thedecision engine re-routes traffic accordingly by selecting a “best” pathat a given time.

While other approaches have optimized outbound paths, they are typicallyeither router-specific or generalized in terms of outbound targets. Theapproach disclosed herein can be implemented as a software layer that isrouter-independent and is tailored to specific targets or endpoints.Unlike conventional approaches, the inventive processes can also accountfor varying inbound flows and optimization of the penultimate inboundstep.

Smart Routing System

FIG. 1A is a schematic illustration of a system 100 that monitors andmeasures latency and packet loss between a virtual machine or server 110at a customer premises 101 (e.g., a buyer in a real-time biddingprocess) and one or more target IP addresses 140 (e.g., an auctioneer orpublisher site). The system monitors these parameters along inboundpaths 160 a-160 d (collectively, inflows or inbound paths 160) andoutbound paths 170 a-170 d (collectively, outflows or outbound paths170) and routes traffic among different paths accordingly. In thisexample, the server 110 is coupled to a router 120, which in turn routestraffic to the target IP address 140 via transit providers 130 a and 130b (collectively, transit providers 130). The system 100 also comprises adecision engine 103 coupled to or implemented by the virtualmachine/server 110. The decision engine 103 selects a transit provider130 for carrying traffic between the customer premises 101 and thetarget IP address 140 based on the latency and packet loss performanceof the transit providers 130 measured by the virtual machine 110.

The customer premises 101 comprise one or more virtual machines orservers 110 that are assigned several origination IP addresses 150 a-150d (collectively, origination IP addresses 150). Each of theseorigination IP addresses 150 is used to measure the latency and packetloss of a unique inbound/outbound path pair provided by the transitproviders 130. Each transit provider 130 provides both an inbound path160 and an outbound path 170, so if there are N transit providers 130that connect the customer premises 101 to the target IP address 140,then the virtual machine 110 is assigned N² different origination IPaddresses 150. In other words, the selected origination IP addresses 150represent the total number of unique round-trip paths between thecustomer premises 101 and the target IP address 140 via the transitproviders 130.

If the customer premises 101 is large enough, it may announce one ormore unique host prefixes. In an IPv4 system, each unique routing prefixmay be a “/24,” i.e., a routing prefix with 24 bits allocated for thenetwork prefix and 8 bits reserved for host addressing. A/24 is thesmallest prefix that BGP will route to. Packets from originating IPaddresses 150 that correspond to unique /24s are channeled throughrespective transit providers 130 as shown in FIG. 1A. A unique /24 foreach transit provider 130 is determined by identifying the smallestprefix BGP will route via that transit provider 130. In this example,originating IP addresses 150 a and 150 b (1.1.1.1 and 1.1.1.2)correspond to the /24 announced behind transit provider 130 a(1.1.1.0/24), and originating IP addresses 150 c and 150 d (2.2.2.1 and2.2.2.2) correspond to the /24 announced behind transit provider 130 b(2.2.2.0/24).

The router 120 routes traffic to the target IP address 140 through thetransit providers 130 according to the BGP tables that it stores on itsinternal memory. These BGP tables are used to assign the originating IPaddresses 150 to the virtual machine 110 for probing the time-varyinglatency and packet loss of each transit provider 130 as described above.And as described below, these BGP tables can be overridden or modifiedby the decision engine 130 to force traffic through a given transitprovider 130 depending on a weighted combination of latency,packet-loss, and cost for the target IP 140.

The inbound paths 160 and outbound paths 170 connect the origination IPaddresses 150 and the target IP address 140 via the transit providers130. Packets travelling along the inbound paths 160 are routed throughthe transit providers 130 depending on the origination IP addresses 150from which they originate. In this example, packets on inbound paths 160a and 160 b are routed through transit provider 130 a while packets oninbound paths 160 c and 160 d are routed through transit provider 130 b.Packets on outbound path 170 a, which connects originating IP address150 a and the target IP address 140, are channeled through transit path130 a. And packets on outbound path 170 b, which connects originating IPaddress 150 b and the target IP 140, are channeled through transitprovider 130 b. Similarly, the outbound paths 170 c and 170 d thatconnect from IP addresses 150 c and 150 d, respectively, to the targetIP address 140 are channeled through transit providers 130 a and 130 b,respectively.

The decision engine 103 compares latency, packet loss, and/or cost forthe transit providers 130 and implements smart routing based on thesecomparisons as described in greater detail below. The decision engine103 modifies or overrides the BGP policy to force traffic through thetransit provider 130 that provides the fastest, most cost effectiveroute to the target IP address 140. The decision engine 103 can beimplemented as a software layer that is router-independent and istailored to the target IP address 140. In some embodiments, the decisionengine 103 can be included in the server 110. In other embodiments, thedecision engine 103 can be included in the router 120. It can also beimplement on another processor.

FIG. 1B illustrates a matrix 105 representing the latencies associatedwith transmitting and receiving packets via the transit providers 130shown in FIG. 1A. The matrix 105 lists the inbound latency 115 and theoutbound latency 125 to the target IP 140 through transit providers 130.These latencies 115, 125 can be summed and compared to identify thelowest latency round-trip path between the customer premises 101 and thetarget IP address 140.

In this example, matrix 105 includes round-trip latency measurements forevery combination of outbound paths 170 to and inbound paths 160 fromthe target IP 140 via transit providers 130 a and 130 b. Since there aretwo transit providers 130, the total number of paths in the matrix 105is 2²=4. In this example, the matrix 105 shows the inflow and outflowlatencies for each of the origination IP addresses 150; these latenciesmap uniquely to different inbound and outbound paths as explained aboveand shown in FIG. 1A. Comparing the round-trip latencies in the matrix105 shows that packet transmission between the customer premises 101 andthe target IP address 140 via transit provider 130 b gives the lowestlatency (12 ms). Based on this latency measurement, the inbound last hopto transit provider 130 b is set by the BGP and the outbound first hopto transit provider 130 b is controlled by policy based routing.

Although the matrix 105 in FIG. 1B shows only latency measurements,those of ordinary skill in the art will readily understand that it mayinclude other measurements in addition to or instead of latencymeasurements. For instance, the matrix may also include packet loss,cost, or a weighted combination of latency, packet loss, and cost.Similarly, the matrix 105 can be extended to any number of transitproviders and target IP addresses.

Measuring Latency and Steering between Endpoints

FIG. 2 is a flow diagram showing a process 200 for routing traffic via aselected transit provider based on latency measurements. This process200 can be implemented using the system 100 illustrated in FIG. 1A orany other suitable system or network, including those shown in FIGS.5A-5C. The process 200 involves measuring latency for a single target IPaddress via different transit providers. For example, given two transitproviders—transit provider 1 and transit provider 2, the latency to thetarget IP via each transit provider is measured in step 210. In step220, the measured latencies are compared to select the transit providerwith the lowest latency to the target IP address. In some cases,external metrics such as initial cost and packet loss are factored intothe comparison as well (230). Following the comparison (220), anappropriate transit provider for the target IP address is selected instep 240. Traffic is steered via the selected transit provider (250).Outbound first hops are controlled by policy-based routing using routemaps or by steering using BGP attributes associated with transitproviders.

Although FIG. 2 illustrates only two transit providers and a singletarget IP address, those of ordinary skill in the art will readilyappreciate that more this process may be applied to more than twotransit providers and more than one IP address. For instance, it mayapplied to each of several IP addresses in parallel, possibly fordifferent numbers of transit providers to each IP address (e.g., twotransit providers to a first IP address, five providers to a second IPaddress, and so on). A single transit provider may serve multiple IPaddresses, but does not need to serve every IP address.

Measuring Latency by Pinging Endpoints (Target/Destination IP Addresses)

FIG. 3 is a flow diagram illustrating a process 300 for collectinginbound and outbound latency data, e.g., using the virtual machine 110shown in FIG. 1A. A collector (collection server) is established on avirtual machine or bare metal on the customer premises 310. Thecollector collects latency data by pinging each target IP address on alist target IP addresses provided by the customer. These pings mayoriginate at different source IP addresses to probe different forwardand return paths as described above.

Pinging occurs as follows. In step 320, the collector sends an InternetControl Message Protocol (ICMP) echo request packet to each target IPaddress via each transit provider being monitored. For example, given anetwork with two transit providers TP1 and TP2, the collector sendsrepeated echo request packets to a first target IP address from a firstsource IP address via TP1 and from a second source IP address via TP2.In step 330, the target IP address responds to the echo request packetsby sending echo reply packets. Each echo reply packet is routed to theapparent source IP address of the corresponding echo request packet. Asexplained above, the apparent source IP address may be different thanthe actual source IP address if the route maps applied to the borderrouter interfaces forces the corresponding echo request to the target IPaddress via a transit provider that announces a different prefix.

In step 340, the collector determines the latency associated with theround-trip measurements based on the timestamps (e.g., the echo requesttime and echo reply time) in the echo reply packets. As well understoodin the art, each echo request message may include a timestamp indicatingthe time of transmission and a sequence number. Likewise, each echoreply message may include the time of transmission and a sequencenumber. Each echo reply also includes the timestamp and sequence numberof the corresponding echo request message. The difference between theecho request and echo reply transmission times indicated by thetimestamps in the echo reply indicate the latency, which may be recordedand stored in a database or other memory storage.

The collector may also assess packet loss based on the ratio of EchoRequest to Echo Replies for each transit provider or the timeliness ofthe Echo Replies. For instance, if the collector sends ten Echo Requestsvia a first transit provider, but only receives eight Echo Replies, thecollector may determine that the first transit provider has a packetloss rate of 20%. Packet loss can be correlated among transit providersto assess the packet losses of inbound and outbound paths, much likeround-trip latency measurements via different transit provider can beused to assess the latencies of inbound and outbound paths.

Determining Optimal Paths Based on Metric Comparisons

FIG. 4 is a flow diagram illustrating a process 400 implemented by thedecision engine 103 shown in FIG. 1A for comparing various metrics fordifferent transit providers connecting a customer premise and a targetIP address. In step 410, the decision engine selects a target IPaddress, e.g., in response to user input. In steps 420 a and 420 b, thedecision engine identifies the transit providers that the customerpremises to the target IP address selected in step 410. In steps 430a-430 d, the decision engine determines the inbound and outbound metricsto the selected target IP through the transit providers identified instep 420. The inbound and outbound metrics include, but are not limitedto latency, cost, and packet loss. Latency and packet loss may bedetermined by pinging the target IP address as described above withrespect to FIG. 3. And cost information may be provided by the customer.

In step 440, the decision engine prepares a matrix, e.g., as shown inFIG. 1B, or other representation of every combination of inbound andoutbound paths. For example, if the number of transit providers is Nthen the total numbers of paths obtained by combination is N². If N isvery large, the decision engine may sample the latencies, packet losses,and/or combinations thereof to reduce the number of measurements and/orcombinations for faster computation. In step 450, the decision enginefactors in external metrics, such as the cost associated with routingpackets via each transit provider. Factoring in the external metrics,the inbound and outbound metrics are consolidated in a matrix or otherrepresentation of preferability scores (weighted combination of latency,cost, and/or packet loss) for each inbound/outbound transit providercombination in step 460. In step 470, the decision engine identifies anoptimal path based on a comparison of the preferability scores in thematrix.

Monitoring and Steering Traffic via Multiple Border Routers

FIGS. 5A-5C depicts a network 500 that measures latency and packet lossbetween a customer premises virtual machine 510 and one or moretarget/destination IP addresses 540 a and 540 b (collectively, target IPaddresses 540). The virtual machine 510, which includes a collector 512that stores a list of the target IP addresses for monitoring andsteering, is coupled to aggregation routers 590 a and 590 b(collectively, aggregation routers 590). Another layer of routinginterface is added using border routers 520 a and 520 b (collectively,520) coupled to the aggregation routers 590. Border routers 520 routethe traffic to other border routers 520 and to transit providers 530a-530 n (collectively, 530).

In operation, the collector 512 monitors the latencies and packet lossesof transmissions between origination or source IP addresses IP1-IPN toand from the listed target IP addresses 540 as described in greaterdetail above and below. Again, the collector 512 uses customer-provided,public-facing IP addresses as source points for collecting latency andpacket loss data. The list of target IP addresses 540 may be establishedby asking customer for distinct IP addresses. The custom collector 512included in the customer virtual machine 510 allows connections to bemade in a periodic manner from customer endpoints or target IPaddresses.

The virtual machine 510 routes traffic through the aggregation routers590 a (SW1) and 590 b (SW2), which use route aggregation methods togenerate a specific route. The method organizes a network 500 byreplacing multiple routes with a single and general route. This reducesthe number of routers and minimizes the overhead related to routingprotocols. The border routers 520 a (BR1) and 520 b (BR2) coupled to theaggregation routers 590 are deployed to perform ingress and egressfiltering. Border routers 520 establish a connection between backbonenetworks and one or more Open Shortest Path First (OSPF) areas.

The aggregation routers 590 route traffic to and from the target IPaddress(es) 540 through an appropriate transit provider 530 based on thelatency and packet loss measurements made by the customer premisevirtual machine 510 and collector 512. As described above and below, theappropriate transit provider 530 for a specific target IP address 540 isselected by analyzing and comparing the monitored metrics, such aslatency, cost, and packet loss, for the transit providers 130. Therouting can be implemented using route maps or by associating BGPattributes with transit providers based on the analyzed metrics asdescribed below.

Monitoring Latency and Packet Loss

In FIG. 5A, the collector 512 monitors latency and packet loss todifferent target IP addresses via the transit providers 530. It doesthis by using policy-based routing to match each IP address configuredon the collector 512 and route packets for each IP address out itsassociated transit provider 530. A route map is applied to each of theingress interfaces 522 a and 522 b on the border routers 520. (Theingress interfaces 522 a and 522 b are also labeled gig 1/1, gig 1/2,and gig 1/3 in FIG. 5A.) These route maps use access lists to match theIP addresses from the collection server 512 and set the next-hop fortransiting packets to the appropriate transit provider 530 or adjacentborder router 520. The route maps applied to each border routerinterface facing the aggregation routers 590 cover all IP addresses andforce outbound Echo Request packets to either the transit providercoupled to the corresponding border router 530 or to a neighboringborder router 530. By forcing Echo Request packets out different transitproviders 530, the collector 512 can measure latency along eachcombination of inbound and outbound paths available between it and thetarget IP address 540.

FIG. 6 and the following pseudo-code illustrate an example of a process600 to configure and apply a route map for monitoring latency and packetloss between a first IP address (e.g., at the customer premises) and asecond IP address (e.g., a target IP address). In step 610, the customersets the access for each target IP address on the collector 512:

Border Router 520a Configuration Border Router 520b Configurationaccess-list 1 permit <IP_1> access-list 1 permit <IP_1> access-list 2permit <IP_2> access-list 2 permit <IP_2> access-list 3 permit <IP_3>access-list 3 permit <IP_3> access-list n permit <IP_N> access-list npermit <IP_N>

In step 620, the customer creates a route map (COLLECTOR_SW) to look foreach destination IP address in the packets coming from the aggregationswitches 590:

Border Router 520a Configuration Border Router 520b Configurationroute-map COLLECTOR_SW permit 10 route-map COLLECTOR_SW permit 10  matchip address 1  match ip address 1  set ip next-hop <T1_IP>  set ipnext-hop<BR1_P2P> ! ! route-map COLLECTOR_SW permit 20 route-mapCOLLECTOR_SW permit 20  match ip address 2  match ip address 2  set ipnext-hop <T2_IP>  set ip next-hop<BR1_P2P> ! ! route-map COLLECTOR_SWpermit 30 route-map COLLECTOR_SW permit 30  match ip address 3  match ipaddress 3  set ip next-hop<BR2_P2P>  set ip next-hop <T3_IP> ! !route-map COLLECTOR_SW permit 40 route-map COLLECTOR_SW permit 40  matchip address 4  match ip address 4  set ip next-hop<BR2_P2P>  set ipnext-hop<TN_IP> ! !

In step 630, the customer creates a route map (COLLECTOR_BR1 andCOLLECTOR_BR2) for the cross-link between the border routers 530:

Border Router 520a Configuration Border Router 520b Configurationroute-map COLLECTOR_BR1 permit route-map COLLECTOR_BR2 permit 10 10 match ip address 1  match ip address 3  set ip next-hop <T1_IP>  set ipnext-hop <T3_IP> ! ! route-map COLLECTOR_BR1 permit route-mapCOLLECTOR_BR2 permit 20 20  match ip address 2  match ip address N  setip next-hop <T2_IP>  set ip next-hop<TN_IP> ! !

In step 640, the customer applies the COLLECTOR_SW route map to eachinterface 522 (gig 1/1 and gig 1/2) facing the aggregation switches 590and cross-links the interfaces 522 (gig 1/3) facing the border routers520 with the COLLECTOR_BR1 and COLLECTOR_BR2 route maps:

Border Router 520a Configuration Border Router 520b Configurationinterface gig 1/1 interface gig 1/1  ip policy route-map  ip policyroute-map  COLLECTOR_BR1  COLLECTOR_BR2 ! ! interface gig 1/2 interfacegig 1/2  ip policy route-map  ip policy route-map COLLECTOR_SWCOLLECTOR_SW ! ! interface gig 1/3 interface gig 1/3  ip policyroute-map  ip policy route-map COLLECTOR_SW COLLECTOR_SW ! !

If each transit provider 530 announces a different /24 as describedabove with respect to FIG. 1A, the collection server 512 can test Noutflows by N inflows. A packet (e.g., an Echo Request packet formeasuring latency) originating from a source IP address belonging to theprefix announced by transit provider 530 a is channeled to itsdestination IP address through each transit provider 530 as describedabove. But a return packet (e.g., an Echo Reply packet in response tothe Echo Request) from the destination IP address transits back to thesource IP address through transit provider 530 a. Measuring eachinflow/outflow combination between a given source and destination IPaddresses yields a matrix of inflow and outflow latency performance(e.g., as shown in FIG. 1B). Comparing the latency measurements makes itpossible to pick the “best” (e.g., lowest latency) combination of inflowand outflow to a given destination IP address at a given time.

Best Transit Decision Engine for Determining a Path to an Endpoint

The virtual machine 510, collection server 512, or separate processormay implement a decision engine (not shown) that executes the followingpseudocode to determine a desired path for routing traffic to a givetarget IP address:

poll the Application Program Interface (API) for data at a regularinterval for each target IP address t:  get all recent measurements (bytime or by count) for t  for each transit provider P:   compute apreferability score for t based on latency, packet   loss, andcustomer-configured cost of using P  decide whether to recommend arouting switch for t

In deciding whether to recommend a switch, the decision engine checkswhich transit provider 530 has the highest preferability score for thetarget IP address and compares that score with the preferability scoreof the current transit provider 530 for that target IP address. Thedecision engine “knows” the current provider either by maintaining arecord of the routing state (e.g., the last recommendation) or byquerying the customer's system for its routing configuration. Thedecision engine may impose a limit on the frequency with which itrecommends switching transit providers 530 to prevent undesiredoscillations between transit providers 530. Similarly, the collector 512may adjust the frequency of its latency and packet measurements toprevent adversely affecting routing performance (e.g., by creatingcongestion with too many Echo Requests and Echo Replies).

Static Routes (Manual Traffic Steering)

FIG. 5B shows how the network 500 steers traffic, manually, via staticroutes set according to the recommendations of the decision engine. Theappropriate transit provider 530 is determined for each endpoint basedon the preferability score, which is a customer-configured weightedcombination of latency, cost, and packet loss. The customer server 510overrides the BGP policy by applying static route for each endpoint. Forexample, if transit provider 530 c provides the path with the lowestpreferability score for traffic to endpoint A, the BGP policy isoverridden and traffic for endpoint A is steered through transitprovider 530 c. Similarly, if transit provider 530 a provides the pathwith the lowest preferability score for traffic to endpoint B, the BGPpolicy is overridden and traffic for endpoint B is steered throughtransit provider 530 a.

FIG. 7 and the following pseudo code illustrate a process 700 for(manually) steering traffic to two target endpoints. In step 710, thedecision engine generates static routes to each endpoint (target IPaddress 540) monitored by the collector 512. In step 720, the decisionengine applies the static routes for endpoints A and B to each of theborder routers 520:

Border Router 520a Configuration Border Router 520b Configuration Iproute <endpoint_a> 255.255.255.255 <T1_IP> ip route <endpoint_a>255.255.255.255 <BR1_P2P> Ip route <endpoint_b> 255.255.255 255 <BR2_IP>ip route <endpoint_B> 255.255.255.255 <T3_IP>

This process 700 may be repeated (steps 730 and 740) for each endpointpointing to the appropriate transit provider 530 or border router 520.Note that the static routes can be applied to border routers 520 for theendpoints 540 in any order or even simultaneously.

Once applied, the static routing works as follows. If a packet destinedfor Endpoint A appears at border router 520 a, border router 520 aroutes the packet via transit provider 530 a. Similarly, if a packetdestined for Endpoint B appears at border router 520 b, border router520 b routes the packet to Endpoint B via transit provider 530 c. But ifa packet destined for Endpoint B appears at border router 520 a, borderrouter 520 a routes the packet to border router 520 b, which in turnroutes the packet to Endpoint B via transit provider 530 c. Similarly,if a packet destined for Endpoint A appears at border router 520 b,border router 520 b routes the packet to border router 520 a, which inturn routes the packet to Endpoint A via transit provider 530 a.

Steer Traffic by Associating BGP Attributes with Transit Providers

Static routes as described above don't scale well and can be unwieldywith respect to configuration and fault management. Fortunately, dynamicsteering can be accomplished using a BGP daemon on the collection server512 at the customer location. This BGP daemon enables the collectionserver 512 to peer with the customer routers 530 either directly or viaone or more route reflector 585 a and 585 b (collectively, routereflectors 585) as shown in FIG. 5C.

FIG. 8 and the following pseudo-code illustrate a process 800 fordynamically configuring a router to steer traffic for a given IP addressvia a particular transit provider using the BGP community attribute.Each transit provider 530 is associated with a different BGP communityattribute. Each host prefix can be associated with a given transitprovider 530 by changing the BGP “community.” Once this association isformed, a border router 520 will steer traffic with a given BGP“communities” attribute via the associated transit provider 530, e.g.,per the following pseudo code:

Example IOS route-map ip prefix-list slash32 seq 5 permit 0.0.0.0/0 ge32 route-map TRAFFIC_STEERING permit 10  match ip address prefix-listslash32  match community <T1_COMMUNITY>  set ip next-hop <T1_P2P>  setcommunity no-export additive route-map TRAFFIC_STEERING permit 20  matchip address prefix-list slash32  match community <T2_COMMUNITY>  set ipnext-hop <T2_P2P>  set community no-export additive route-mapTRAFFIC_STEERING permit 30  match ip address prefix-list slash32  matchcommunity <T3_COMMUNITY>  set ip next-hop <T3_P2P>  set communityno-export additive

The process 800 can be implemented by configuring the border routers 520with policies that match a unique BGP communities attribute assigned toeach transit provider 530 (step 810). Once matched to a given BGPcommunity, each border router 520 changes its corresponding next-hoptowards the associated transit provider 530 (step 820). If anothertransit provider 530 begins offering lower latency to the same endpoint,the BGP daemon changes the associations among the border routers 520 andtransit providers 530 by changing the value of the BGP communitiesattribute for that endpoint. For example, the BGP daemon may apply thefollowing route map on the BGP session:

Example IOS route-map router bgp ABCD  <snip>  neighbor <BGP_DAEMON>route-map TRAFFIC_STEERING in  <snip>

Real-Time User Monitoring for Resolving DNS Queries

Another approach to steering internet data traffic in an optimal manneris by resolving Domain Name System (DNS) queries based on variousperformance metrics, including latency and cost. This is achieved bycollecting and analyzing Real User Monitoring (RUM) data to predictperformance for providing content from different content origins to theclient and for querying a given authoritative server with a givenrecursive resolver. The predicted performance can be used to steeringthe client making the DNS query to a given content origin, which mayprovide content from a content delivery network (CDN) or cloud provider,and/or to steer a recursive resolver to a given authoritative server.The traffic is steered based on the predicted performance of the contentorigin with respect to the client's IP address. More specifically, oneor more servers collect RUM data for different, processing the RUM dataat IP level, aggregating the RUM data across sets of IP addresses, andcreating a database for fast access to the aggregated data. The databaseis then used to steer traffic in an optimal manner.

As understood by those of skill in the art, DNS is a hierarchicaldistributed naming system for computers, services, or any resourceconnected to the Internet or a private network. It associates variousinformation with domain names assigned to each of the participatingentities. DNS also translates more readily memorized domain names to thenumerical Internet Protocol (IP) addresses used to locate and identifycomputer services and devices with the underlying network protocols.

Authoritative DNS servers, also known as authoritative name servers orauthoritatives, respond to queries about the mapping of domain names tonumerical IP addresses and also to requests for other resource records(RRs), such as mail exchange (MX) records. To respond to these queries,each authoritative has its own DNS database of DNS records. Common typesof records stored in a DNS database include IP addresses (A and AAAA),Simple Mail Transfer Protocol (SMTP) MX records, and name server (NS)records for the corresponding domain A DNS database can also storerecords for other types of data, including domain name aliases (CNAME)and DNS Security Extension (DNSSEC) records, which can be used toauthenticate DNS records.

To add a new domain to the Internet, basic DNS standards call for thedomain owner, or registrant, to purchase a domain name from a registrarand specify the names of the authoritative DNS servers used to answerqueries for the new domain. The registrant obtains authoritative DNSservice from an authoritative DNS provider (such as Dynamic NetworkServices Inc. of Manchester, N.H.) and configures the records for itsdomain name (or more precisely, zone) with the authoritative DNSprovider. When an end user's machine attempts to access the new domainname, it asks a recursive DNS server, also called a recursive server,recursive resolver, or recursive, to retrieve DNS records for the newdomain, most commonly A or AAAA (IPv4 or IPv6 address). These DNSrecords include the IP address of the content origin that provides thecontent or other information being requested by the end user. Therecursive server locates an authoritative DNS server (also called anauthoritative server or simply an authoritative) maintained by theauthoritative DNS provider, then queries the authoritative DNS serverfor the DNS record. The recursive DNS server returns the authoritativeDNS server's answers to the end user's machine and may also cache theanswers according to their time to live (TTL). The end user's machinethen attempts to access the domain using a DNS record provided by theauthoritative DNS server.

Conventional recursive and authoritative DNS servers do not account forthe latency associated with the packet transmission between the IPaddress of the content origin for the new domain and the end user'smachine (the client). Instead, the authoritative server simply providesIP addresses according to a (static) policy set by the operator of thenew domain. As a result, conventional name servers may not steer theclient to the content origin offering the lowest latency.

RUM Data Monitoring System

FIG. 9 shows a system 900 that monitors RUM data and uses RUM data toresolve DNS requests based on latency and other factors. The system 900includes a client 930 that communicates with content origins 910 a-910 c(collectively, content origins 910) and authoritative server 920 a andrecursive resolver 920 b (collectively, authoritative DNS serverrecursive resolver 920) via the internet 901 or another packet-switchednetwork. The system 900 also includes a RUM database 940, which storesRUM data, and another database 950, which stores Typed Labeled IP Sets(TYLIPS).

In operation, the client 930 requests sends a DNS request 931 to theauthoritative server 920 a as part of a process of accessing contentstored on one of the content origins 910. The authoritative server 920 aresponds to this request by selecting a content origin with the desiredperformance based on the client's IP address and performance rankings ofthe content origins' performance for providing data to other clients(not shown) with IP addresses on the same subnet or in the samegeographic region as the client. This ranking may be tailoredspecifically to authoritative server 920 a. The authoritative server 920a provides the IP address or host name 921 of the selected contentorigin (e.g., content origin 910 a) to the client 930. The client 930downloads the content 911 from the selected content origin 910,generating additional performance data for resolving future DNSrequests. Relevant requests from the client 930 are sent via therecursive resolver 920 b.

Collecting RUM Data

FIG. 10 is a flow diagram that illustrates a process 1000 for creating adatabase of RUM data to steer traffic using the system 900 shown in FIG.9. In step 1010, internet performance data is collected as a stream ofreal-user monitoring (RUM) records. Data is collected from users orclients that request or download data from a plurality of contentproviders or content origins. Each RUM record is processed in step 1020by measuring the download times of the same data sample from variouscontent origins nearly simultaneously. Processing allows for directcomparison of each pair of content origins.

In step 1030, the IP addresses are grouped in Typed Labeled IP Sets(TYLIPS). TYLIPS are sets of IP addresses that share a common feature,such as the same country, originated by the same provider etc.Histograms of relative content origin performance are accumulated foreach IP address. These histograms are then combined and accumulated forTYLIPS.

For each TYLIPS, timings, failures and other information from recent RUMdata are used to compute a performance score in step 1040. These scoresare used to rank the content origins for the IP addresses belonging tothat TYLIPS. Content origins and their associated TYLIPs ranking arestored in the TYLIPs database. This database provides fast access toaggregated data and is used to steer traffic in an optimal manner.

Internet performance data can be collected, for example, from users orclients who request and download data from a plurality of contentproviders or content origins. The data is organized in records and eachRUM record can be associated with downloads from a user to a pluralityof content origins and, contain one or more of the following: (1)client's Internet Protocol (IP) address, (2) IP address(es) of one ormore recursive resolvers used for DNS resolution, (3) an identifieruniquely associated with the content origin, for example, UniformResource Identifier (URI), and (4) temporal data associated with thedownload. A content origin can be, for example, a content deliverynetwork (CDN), such as Akamai, Level 3, a cloud provider, such asDigital Ocean, Amazon, or a content publisher's private data center. Thetemporal data associated with a download can include variousintermediate measures of download speed such as time of Domain NameServer (DNS) resolution, time to establish a connection, time to firstbyte, time to last byte, total duration to download a data sample from aparticular content origin etc.

FIG. 11 illustrates another process 1100 for collecting a stream ofreal-user monitoring (RUM) records. In step 1110 a code such asJavaScript is deployed to download RUM data. In some embodiments, thecode is deployed via the webpage of the content origins. In otherembodiments, the code is deployed in the datacenter of the contentorigins. When the client visits the content origins' webpage, thedeployed code is downloaded on the client's browser (step 1120). In step1130, the client executes this code to collect RUM data. In step 1140,the client sends RUM data, including but not limited to the client andcontent origin IP addresses, DNS request resolution time, URL of thecontent origin, and download time for each download, to the RUMdatabase. This client may repeat data collection and transmission fordownloads from different content origins, multiple downloads from thesame content origin, or both in simultaneous and/or sequentialmeasurements in quick succession (step 1150). Comparing the DNS requestresolution times and download times for different IP addresses yieldsrankings associated with different combinations of clients, recursiveresolvers, and/or content origins (step 1160). These rankings may beused to respond to further DNS requests, e.g., to reduce the total timeor the time associated with one or more steps of the content originidentification and content download process (step 1170).

The operation of code used to collect RUM records is illustrated withreference to the following non-limiting example. A client visits the webpage for US Patent Full Page Imageshttp://patft.uspto.gov/netahtml/PTO/patimg.htm via a web browser. Theweb page provides the JavaScript code which is downloaded by theclient's browser. In this example, while the client downloads from theweb page a full-page image of a US patent, the JavaScript code executeson the web browser and collects RUM data. The JavaScript code cancollect (1) the IP address of the client that visited the web page forUS Patent Full Page Images, (2) the IP address of the DNS recursiveresolver used by the client, (3) the URI of the content origin for thedata sample, and (4) various intermediate times of the process ofdownloading the data sample.

RUM Data Processing

In each RUM record, the download times of the same data sample from thevarious origins are measured nearly simultaneously. This allows for adirect performance comparison of each pair of content origins. For eachpair of content origins, the difference between corresponding downloadtimings of the same data sample is computed, for example, differencesbetween DNS resolution times and/or connection times. These differencesare accumulated over a period of time. Histograms of these differencesare computed for each pair of origins and each type of timing. Someexamples of timing are DNS resolution or download time.

For example, a client with an IP address geolocated in Houston, Tex.,and using a recursive resolver with an IP address geolocated in Dallas,Tex., may see DNS resolution and download times of 10 ms and 40 ms fromOID1, and 15 ms and 50 ms, from OID2, respectively. In this example, thedifferences for the pair (OID1, OID2) are −5 ms for DNS resolution and−10 ms for download time. These differences, accumulated over time, canbe used to create histograms indexed jointly by the client or recursiveIP, or a feature of these IPs (e.g., geolocation, Internet ServiceProvider), timing type (e.g., DNS resolution, download time), and originpair.

FIG. 12 shows an example histogram for all client IPs in Houston, Tex.,from differences of DNS resolution times for content origins in twodifferent content delivery networks (CDNs)—here, Akamai andFastly—collected over 24 hours. The histograms of differences betweenorigin pairs are used to compare the performance of one origin relativeto the other. In some instances, including FIG. 12, this comparison isachieved by counting how many positive and negative values occur in eachhistogram of differences. For example on a histogram of differences fora pair of origins (OID1, OID2), the negative values represent situationswhen the timing for OID1 was lower than the timing for OID2, so OID1'sperformance was better. The positive values represent the oppositesituation when OID2's performance was better. If the difference waszero, then the performance of OID1 and OID2 was identical. Theperformance can also be considered to be equivalent if the absolutedifference of timings was below a given threshold, for example, if theabsolute difference of the timings is under 20 ms. For each origin, thehead-to-head comparisons of performance against the other origins in acohort can be averaged to produce a single score representative ofoverall performance of a particular origin. To score each originrelative to the others, other measures specific to an origin such asmedian latency, variability and/or stability of latencies over time,failure rates, etc. are used.

TYped Labeled IP Sets (TYLIPS) Data Aggregation

RUM data is aggregated over groups of IP addresses sharing one or morecommon features. These sets are referred to as TYped Labeled IP Sets, or“TYLIPS”. Some examples of TYLIPS are: France (type=country), Boston(type=city), AS174 (type=Internet Service Provider (ISP)), and (Paris,AS5511) (type=city-provider). The term “TYLIPS” can also be usedinterchangeably with the term “IP feature”. A single IP is a TYLIPS ofsize one. Because TYLIPS are sets of IP addresses, they allow the use ofmathematical set operations and have all the properties of sets. Forexample, two TYLIPS may intersect, or one TYLIPS may be contained inanother, larger TYLIPS.

FIG. 13 is a flow diagram illustrating the process for aggregating RUMdata. In step 1310, the download time for each pair of origins ismeasured almost simultaneously. These differences are accumulated over aperiod of time. In step 1320, the difference for each pair of origin iscomputed for the accumulated period of time and histograms aregenerated.

These histograms of relative origin performance can be built either on a“per client IP address” basis or on a “per recursive resolver IPaddress” basis. Histograms are accumulated for each IP address and arecombined and accumulated to produce histograms for groups of IPaddresses (step 1330). Each group of IP addresses is chosen based on allIP addresses from the group sharing one or more common features. Thecommon feature can be, for example, geography (IP addresses from thegroup are geolocated to a particular city, country, or continent),origination by or transit through a particular Internet Service Provider(ISP), or membership in a common organization. The common feature canalso be a joint feature, such as geography and ISP (e.g., IP addressesoriginated by TeliaSonera in Helsinki).

In step 1340, the performance of one origin relative to another withinthe same TYLIPS is compared. The TYLIPS are ranked based on theirperformance and overall score (step 1350). A recursive resolver can usethe TYLIPs rankings to select a particular content origin for aparticular client in response to a subsequent DNS request (step 1360).

In the context of optimal steering of Internet traffic using RUM data,it is likely for some IP addresses to have data that is incomplete or ofunsuitable quality. If complete data were available, decisions for eachIP address can be made using data associated with that IP address. Toaddress the issues of data quality or data sparsity in practice, the RUMdata is aggregated into TYLIPS and a hierarchy of TYLIPS is defined. Agiven IP is contained by several, successively larger TYLIPS in thehierarchy. The TYLIPS are ranked based on their degrees of specificity,the amount of data available, the quality of data collected, and othersimilar criteria. When data for an IP is not available, the mostspecific TYLIPS, for example, the smallest, for which enough data ofsufficient quality is available and is used. The underlying assumptionis that the performance profile of the given IP is similar to theperformance profile of the IPs in the most specific TYLIPS.

FIGS. 14A and 14B show different hierarchies of TYLIPS. In FIG. 14A,based on the hierarchy of TYLIPS sets, for IP1 the TYLIPS “NetworkPrefix” is chosen. For IP2 the TYLIPS chosen is the “BGP ASN” in an“Administrative Division,” for example, an ISP in a US state. While, forIP3 the TYLIPS chosen is the “Country.” In FIG. 14B, IP address88.221.8.1 belongs to the following TYLIPS hierarchy, which may or maynot be predefined: prefix 88.221.8.0/22, AS5511, city of Madrid,province Comunidad de Madrid, country Spain, region Western Europe, andcontinent Europe. If a request came for this IP address, the mostspecific TYLIPS with enough data is selected.

Some TYLIPS are contained in other TYLIPS, for instance, city inprovince, province in country, while some TYLIPS only intersect, forinstance, prefix and country. For another IP address, say, 90.84.255.1,the most specific data available may be only at country level, and itsTYLIPS hierarchy is country Spain, region Western Europe, continentEurope.

From the hierarchy, the most specific TYLIPS can be chosen from amongthe available TYLIPS. The most specific TYLIPS is chosen by selectingthe TYLIPS whose performance data best matches the profile of the IPaddress. Additionally, the most specific TYLIPS is chosen based onenough data available.

Ranking TYLIPs

As described above with respect to collecting RUM data, when a clientvisits a content origin, the client downloads and executes an image orcode deployed in the content origin. This code or image records RUMdata, such as download time, the time at which the measurement is made,the location of the client's IP etc. The set of measurements is referredto as set of timing measurements from one client IP to all contentorigins where the code or image is hosted as a beacon. These beacons aretransferred to data processing servers for processing data.

The content origin rankings are computed from RUM data. Data isaggregated over a time interval. For example, data is aggregated over 24hours. For each beacon in the time interval the timing differencebetween each pair of content origins is computed.

For instance, if in a beacon the following times for 3 content originsare measured:

-   -   CDN_A: 60 ms, CDN_B: 100 ms, CDN_C: 40 ms, CDN_D: 200 ms then        the pairwise differences are:    -   CDN_A-B: −40 ms, CDN_A-C: 20 ms, CDN_A-D: −140 ms    -   CDN_B-C: 60 ms, CDN_B-D: −100 ms    -   CDN_C-D: −160 ms

Over the time interval the distribution of time differences for eachpair of content origins is computed. This allows for computing theaverage difference or for identifying the percent of time one contentorigin is better than another.

Several rankings can be computed from pairwise content originstatistics. For instance, an illustration of ranking based on “percentof time better” is disclosed. For a given content origin, the percent ofthe time the content origin is better when compared to its competitorsis identified. Then the percentages are averaged to compute a score.These scores are used to rank the content origins and group contentorigins with a similar score into grades. This is best illustrated withan example. For the pairwise comparisons of four content origins, thefollowing percentages show when one content origin is better thananother:

-   -   A-B 52%-48%, A-C 75%-25%, A-D 95%-5%    -   B-C 70%-30% C-D 90%-10    -   C-D 60%-40%

In tabular form, these rankings are:

Content Origin A B C D A — 52% 75% 95% B 48% — 70% 90% C 25% 30% — 60% D 5% 10% 40% —

In this example, the content origin A is the best, but it's almost thesame as content origin B, while being significantly better than contentorigin C, and a lot better than content origin D, which is the worst ofall.

Content origin A is better compared to content origins B, C, and D, 52%,75%, and 95% of the time, respectively. The average of the percentagesis 74%. The average percentages of content origins B, C, and D are69.33%, 38.33%, and 18.33% respectively Using these averages the contentorigins are ranked as follows:

CDN Score Rank A 74.00% 1 B 69.33% 2 C 38.33% 3 D 18.33% 4

FIG. 15 illustrates an exemplary example of rankings for client IPaddresses in Japan for data between Mar. 2, 2016 0:00 UTC and Mar. 3,2016 0:00 UTC. The rankings along with the scores are illustrated in1510. The percentage matrix 1520, is a matrix with the percentage betterfor each content origin on the rows. For instance, Fastly is better thanEdgecast about 54% of the time. Not all pairs of percentages add to100%. This is because a percentage of the measurements were identical,i.e., both content origins had identical performance. The contentorigins with similar performance are grouped into grades. For example,in grade A the largest score difference between a pair of contentorigins is less than 10.

To group content origins into grades, the scores are considered indecreasing order. Initially, highest grade for instance A or 0 isconsidered. For a given score with a grade, the gaps to the previous andnext scores are computed in the order. Additionally, the gap between thescore and the top score within the same grade is computed. Advance tothe next grade if the score difference is strictly greater than two andif: (1) the gap between current score and next score is greater than10%, i.e., the next score is less than 90% the current score or (2) thegap between the next score and the top grade score is greater than 10%(the next score smaller than 90% of the top grade score) and the gapbetween next score and current score is greater than three times the gapbetween previous score and current score.

For example, break between 50 and 40 because the difference between themis 10, which is greater than 2, and 40 is less than 90% of 50, which is45. Similarly, for scores 60, 57, 55, 53, 51, 50, 46, break between 50and 46 because 50−46=4>2, 46<(0.9×60)=54, and 50−46=4>3×(51−50)=1.

If the difference between current grade and next grade is greater than20% advance the grade by more than one step as follows: (1) fordifferences between 10% and 20% advance one grade, e.g., A to B; (2) fordifferences between 20% and 40% advance two grades, e.g., A to C; (3)for differences between 40% and 80% advance three grades, e.g., A to D;and (4) for differences more than 80% advance to F.

Therefore, similar scores get the same grade. A grade break is appliedbetween scores with a significant difference (10%). The grade breaks aresuch that the top score and bottom score within a grade are not toodifferent.

Steering Traffic Using RUM Data Aggregated over TYLIPS

FIG. 16 illustrates a process 1005 for steering traffic using RUM dataaggregated over one or more TYLIPS. The client 930 sends a DNS requestto the recursive resolver 920 b to resolve domain to an IP address, andthe recursive resolver forwards the DNS request to the authoritative DNSserver 920 a (step 1610). The authoritative DNS server and recursiveresolver 920 provide the IP address of the client's DNS recursiveresolver and the client's IP address, if available, (step 1620) to theTYLIPS database 950, which retrieves the most specific available TYLIPSassociated with the client's DNS recursive resolver's and client's IPaddresses. The TYLIPS database 950 also retrieves the correspondingrankings of the content origins for the most specific available TYLIPsand selects a content origin(s) based on the rankings. The TYLIPsdatabase 950 provides the selected content origin 1630 to theauthoritative DNS server 920 a and recursive resolver 920 b, whichrespond to the client's DNS request by sending the IP address of theoptimal content origin(s) to the client 930.

Based on the RUM data, the recursive resolver's IP address can beassociated with TYLIPS of the client's IP address. If the recursiveresolver's IP address is not observed in the RUM data, then therecursive resolver's IP address may be used to find the hierarchy ofTYLIPS. Client subnet data, such as the client's prefix, may also beused to find the hierarchy of TYLIPS.

A recursive resolver IP address can be associated with a hierarchy of IPfeatures, or TYLIPS, belonging to the client IP addresses represented bythe recursive resolver IP address. For example, a recursive resolver canmake queries to an authoritative DNS server on behalf of clients in arange of cities on the East Coast of the United States. In otherinstances, one or more features of the recursive resolver IP address canbe used directly as the basis for steering. For example, the recursiveresolver may be geolocated to Boston Regardless, a set of TYLIPSassociated with the query from the recursive resolver is selected, andthis selected set of TYLIPS is used in the steering decision.

Take, for example, a recursive resolver geolocated in Somerville, Mass.,and originated by Comcast. If there are enough RUM records associatedwith this recursive resolver's IP address to discriminate betweenmultiple origin candidates and select a proper origin, the rankingspecifically associated with the recursive resolver's IP address can beused. Otherwise, the origin ranking associated with a region of lesserspecificity (e.g., the city of Somerville, the state of Massachusetts,or the region of New England) having sufficient RUM records to form thebasis for discrimination can be used. It is often desirable to use themost specific feature or joint feature for which there is enough data ofgood quality to allow a clear recommendation for the proper origin to bemade. In other words, the most specific TYLIPS for which there is enoughdata is selected, and the content origin with the best score for themost specific TYLIPS is recommended. Data can be quantified as enough byproviding a threshold for desirable quantity of RUM data and analyzingif the current quantity is greater than the threshold.

For example, a content provider (e.g., the New York Times) may pay anauthoritative DNS provider to steer users to www.nytimes.com to a propercontent origin among multiple content origins (e.g., origin located inEurope and North America). The authoritative DNS provider collects RUMrecords (e.g., using the methods discussed above), compares performanceof www.nytimes.com based on user locations, and provides arecommendation for a content origin. For example, the authoritative DNSprovider may recommend Europe rather than North America.

An authoritative DNS provider for a given zone provides real-timetraffic steering so that one or more users represented by a queryingrecursive DNS resolver are mapped to an origin for the requestedcontent. The origin can be chosen based on low latency, highavailability, stability, and other similar properties. In other words,the authoritative DNS provider can refer the recursive resolverrequesting a domain to the most desirable location to get data for thatdomain.

Thus, a process to compute from a recursive IP and/or client IP ahierarchy of TYLIPS is disclosed. For each TYLIPS access to a databasewith precomputed scores and ranks of content origins is available. Thebest TYLIPS is selected, for example, the most specific TYLIPS for whichthere is enough data. The scores and ranks of the best TYLIPS are usedto match the domain requested by the recursive IP with the contentorigin(s) with the best score(s).

Embodiments of the present invention can be used to steer traffic inreal-time, or to configure a DNS in such a way that it would achieve adesirable level of performance based on past performance. Using themethods of the present invention, a map can be generated that matchesgeographies to desirable CDNs. For example, a proper content origin canbe recommended for queries originating from Massachusetts, even if theuser does not currently purchase CDN services from that content origin.Embodiments of the present invention can therefore be used to evaluatenew CDN service purchases.

CONCLUSION

While various inventive embodiments have been described and illustratedherein, those of ordinary skill in the art will readily envision avariety of other means and/or structures for performing the functionand/or obtaining the results and/or one or more of the advantagesdescribed herein, and each of such variations and/or modifications isdeemed to be within the scope of the inventive embodiments describedherein. More generally, those skilled in the art will readily appreciatethat all parameters, dimensions, materials, and configurations describedherein are meant to be exemplary and that the actual parameters,dimensions, materials, and/or configurations will depend upon thespecific application or applications for which the inventive teachingsis/are used. Those skilled in the art will recognize, or be able toascertain using no more than routine experimentation, many equivalentsto the specific inventive embodiments described herein. It is,therefore, to be understood that the foregoing embodiments are presentedby way of example only and that, within the scope of the appended claimsand equivalents thereto, inventive embodiments may be practicedotherwise than as specifically described and claimed. Inventiveembodiments of the present disclosure are directed to each individualfeature, system, article, material, kit, and/or method described herein.In addition, any combination of two or more such features, systems,articles, materials, kits, and/or methods, if such features, systems,articles, materials, kits, and/or methods are not mutually inconsistent,is included within the inventive scope of the present disclosure.

The above-described embodiments can be implemented in any of numerousways. For example, embodiments of designing and making the technologydisclosed herein may be implemented using hardware, software, or acombination thereof. When implemented in software, the software code canbe executed on any suitable processor or collection of processors,whether provided in a single computer or distributed among multiplecomputers.

Further, it should be appreciated that a computer may be embodied in anyof a number of forms, such as a rack-mounted computer, a desktopcomputer, a laptop computer, or a tablet computer. Additionally, acomputer may be embedded in a device not generally regarded as acomputer but with suitable processing capabilities, including a PersonalDigital Assistant (PDA), a smart phone or any other suitable portable orfixed electronic device.

Also, a computer may have one or more input and output devices. Thesedevices can be used, among other things, to present a user interface.Examples of output devices that can be used to provide a user interfaceinclude printers or display screens for visual presentation of outputand speakers or other sound generating devices for audible presentationof output. Examples of input devices that can be used for a userinterface include keyboards, and pointing devices, such as mice, touchpads, and digitizing tablets. As another example, a computer may receiveinput information through speech recognition or in other audible format.

Such computers may be interconnected by one or more networks in anysuitable form, including a local area network or a wide area network,such as an enterprise network, and intelligent network (IN) or theInternet. Such networks may be based on any suitable technology and mayoperate according to any suitable protocol and may include wirelessnetworks, wired networks or fiber optic networks.

The various methods or processes (e.g., of designing and making thetechnology disclosed above) outlined herein may be coded as softwarethat is executable on one or more processors that employ any one of avariety of operating systems or platforms. Additionally, such softwaremay be written using any of a number of suitable programming languagesand/or programming or scripting tools, and also may be compiled asexecutable machine language code or intermediate code that is executedon a framework or virtual machine.

In this respect, various inventive concepts may be embodied as acomputer readable storage medium (or multiple computer readable storagemedia) (e.g., a computer memory, one or more floppy discs, compactdiscs, optical discs, magnetic tapes, flash memories, circuitconfigurations in Field Programmable Gate Arrays or other semiconductordevices, or other non-transitory medium or tangible computer storagemedium) encoded with one or more programs that, when executed on one ormore computers or other processors, perform methods that implement thevarious embodiments of the invention discussed above. The computerreadable medium or media can be transportable, such that the program orprograms stored thereon can be loaded onto one or more differentcomputers or other processors to implement various aspects of thepresent invention as discussed above.

The terms “program” or “software” are used herein in a generic sense torefer to any type of computer code or set of computer-executableinstructions that can be employed to program a computer or otherprocessor to implement various aspects of embodiments as discussedabove. Additionally, it should be appreciated that according to oneaspect, one or more computer programs that when executed perform methodsof the present invention need not reside on a single computer orprocessor, but may be distributed in a modular fashion amongst a numberof different computers or processors to implement various aspects of thepresent invention.

Computer-executable instructions may be in many forms, such as programmodules, executed by one or more computers or other devices. Generally,program modules include routines, programs, objects, components, datastructures, etc. that perform particular tasks or implement particularabstract data types. Typically the functionality of the program modulesmay be combined or distributed as desired in various embodiments.

Also, data structures may be stored in computer-readable media in anysuitable form. For simplicity of illustration, data structures may beshown to have fields that are related through location in the datastructure. Such relationships may likewise be achieved by assigningstorage for the fields with locations in a computer-readable medium thatconvey relationship between the fields. However, any suitable mechanismmay be used to establish a relationship between information in fields ofa data structure, including through the use of pointers, tags or othermechanisms that establish relationship between data elements.

Also, various inventive concepts may be embodied as one or more methods,of which an example has been provided. The acts performed as part of themethod may be ordered in any suitable way. Accordingly, embodiments maybe constructed in which acts are performed in an order different thanillustrated, which may include performing some acts simultaneously, eventhough shown as sequential acts in illustrative embodiments.

All definitions, as defined and used herein, should be understood tocontrol over dictionary definitions, definitions in documentsincorporated by reference, and/or ordinary meanings of the definedterms.

The indefinite articles “a” and “an,” as used herein in thespecification and in the claims, unless clearly indicated to thecontrary, should be understood to mean “at least one.”

The phrase “and/or,” as used herein in the specification and in theclaims, should be understood to mean “either or both” of the elements soconjoined, i.e., elements that are conjunctively present in some casesand disjunctively present in other cases. Multiple elements listed with“and/or” should be construed in the same fashion, i.e., “one or more” ofthe elements so conjoined. Other elements may optionally be presentother than the elements specifically identified by the “and/or” clause,whether related or unrelated to those elements specifically identified.Thus, as a non-limiting example, a reference to “A and/or B”, when usedin conjunction with open-ended language such as “comprising” can refer,in one embodiment, to A only (optionally including elements other thanB); in another embodiment, to B only (optionally including elementsother than A); in yet another embodiment, to both A and B (optionallyincluding other elements); etc.

As used herein in the specification and in the claims, “or” should beunderstood to have the same meaning as “and/or” as defined above. Forexample, when separating items in a list, “or” or “and/or” shall beinterpreted as being inclusive, i.e., the inclusion of at least one, butalso including more than one, of a number or list of elements, and,optionally, additional unlisted items. Only terms clearly indicated tothe contrary, such as “only one of” or “exactly one of,” or, when usedin the claims, “consisting of,” will refer to the inclusion of exactlyone element of a number or list of elements. In general, the term “or”as used herein shall only be interpreted as indicating exclusivealternatives (i.e. “one or the other but not both”) when preceded byterms of exclusivity, such as “either,” “one of,” “only one of,” or“exactly one of.” “Consisting essentially of,” when used in the claims,shall have its ordinary meaning as used in the field of patent law.

As used herein in the specification and in the claims, the phrase “atleast one,” in reference to a list of one or more elements, should beunderstood to mean at least one element selected from any one or more ofthe elements in the list of elements, but not necessarily including atleast one of each and every element specifically listed within the listof elements and not exclusing any combinations of elements in the listof elements. This definition also allows that elements may optionally bepresent other than the elements specifically identified within the listof elements to which the phrase “at least one” refers, whether relatedor unrelated to those elements specifically identified. Thus, as anon-limiting example, “at least one of A and B” (or, equivalently, “atleast one of A or B,” or, equivalently “at least one of A and/or B”) canrefer, in one embodiment, to at least one, optionally including morethan one, A, with no B present (and optionally including elements otherthan B): in another embodiment, to at least one, optionally includingmore than one, B, with no A present (and optionally including elementsother than A); in yet another embodiment, to at least one, optionallyincluding more than one, A, and at least one, optionally including morethan one, B (and optionally including other elements); etc.

In the claims, as well as in the specification above, all transitionalphrases such as “comprising,” “including,” “carrying,” “having,”“containing,” “involving,” “holding,” “composed of,” and the like are tobe understood to be open-ended, i.e., to mean including but not limitedto. Only the transitional phrases “consisting of” and “consistingessentially of” shall be closed or semi-closed transitional phrases,respectively, as set forth in the United States Patent Office Manual ofPatent Examining Procedures, Section 2111.03.

The invention claimed is:
 1. A method of directing traffic from acustomer premises to an Internet Protocol (IP) address among a pluralityof transit providers, the method comprising: measuring a first latencyon a first path from a collector device at the customer premises to theIP address, wherein the first path comprises a first transit provider inthe plurality of transit providers and a first border router coupled tothe first transit provider; measuring a second latency on a second pathfrom the collector device to the IP address, wherein the second pathcomprises a second transit provider in the plurality of transitproviders, a second border router, and the first border router;performing a comparison of the first latency and the second latency;selecting the second transit provider based on the comparison of thefirst latency and the second latency; and directing traffic from thecustomer premises to the IP address, wherein directing the traffic tothe IP address comprises directing the traffic to the second transitprovider on the second path via the first border router and the secondborder router.
 2. The method of claim 1, wherein measuring the firstlatency comprises: transmitting an echo request to the IP address viathe first transit provider; and receiving an echo reply via the secondtransit provider.
 3. The method of claim 1, wherein measuring the firstlatency comprises: transmitting an echo request to the IP address via afirst interface of a border router coupled to the first transitprovider; and receiving an echo reply via a second interface of theborder router.
 4. The method of claim 1, wherein performing thecomparison of the first latency and the second latency comprises:comparing an inbound latency of the first transit provider to an inboundlatency of the second transit provider; and comparing an outboundlatency of the first transit provider to an outbound latency of thesecond transit provider.
 5. The method of claim 1, wherein selecting theone of the first transit provider and the second transit providerfurther comprises: selecting the one of the first transit provider andthe second transit provider based on a cost of the first transitprovider and a cost of the second transit provider.
 6. The method ofclaim 1, wherein selecting the one of the first transit provider and thesecond transit provider further comprises: selecting the one of thefirst transit provider and the second transit provider based on a packetloss of the first transit provider and a packet loss of the secondtransit provider.
 7. The method of claim 1, wherein directing thetraffic to the IP address comprises: associating a host prefix of apacket with a Border Gateway Protocol (BGP) community attribute; anddirecting the packet to the one of the first transit provider and thesecond transit provider based on the BGP community attribute of the hostprefix.
 8. The method of claim 1, wherein directing the traffic to theIP address comprises: setting a next hop for traffic destined to the IPaddress to be a border router coupled to the one of the first transitprovider and the second transit provider.
 9. A method of directingtraffic from a customer premises to an Internet Protocol (IP) addressamong a plurality of transit providers, the method comprising: measuringa first latency on a first path from a collector device at the customerpremises to the IP address, wherein the first path comprises a firsttransit provider in the plurality of transit providers and a firstinterface on a border router coupled to the first transit provider andthe second transit provider; measuring a second latency on a second pathfrom the collector device to the IP address, wherein the second pathcomprises a second transit provider in the plurality of transitproviders and a second interface on the border router; performing acomparison of the first latency and the second latency; selecting thesecond transit provider based on the comparison of the first latency andthe second latency; and directing traffic from the customer premises tothe IP address via the second transit provider, wherein directing thetraffic to the IP address comprises directing the traffic to the secondtransit provider via the second interface on the border router.
 10. Anon-transitory computer readable medium storing instructions which, whenexecuted by one or more hardware processors, cause performance ofoperations for directing traffic from a customer premises to an InternetProtocol (IP) address among a plurality of transit providers, theoperations comprising: measuring a first latency on a first path from acollector device at the customer premises to the IP address, wherein thefirst path comprises a first transit provider in the plurality oftransit providers and a first border router coupled to the first transitprovider; measuring a second latency on a second path from the collectordevice to the IP address, wherein the second path comprises a secondtransit provider in the plurality of transit providers, a second borderrouter, and the first border router; performing a comparison of thefirst latency and the second latency; selecting the second transitprovider based on the comparison of the first latency and the secondlatency; and directing traffic from the customer premises to the IPaddress, wherein directing the traffic to the IP address comprisesdirecting the traffic to the second transit provider on the second pathvia the first border router and the second border router.
 11. The mediumof claim 10, wherein the operations for measuring the first latencyfurther comprise: transmitting an echo request to the IP address via thefirst transit provider; and receiving an echo reply via the secondtransit provider.
 12. The medium of claim 10, wherein the operations formeasuring the first latency further comprise: transmitting an echorequest to the IP address via a first interface of a border routercoupled to the first transit provider; and receiving an echo reply via asecond interface of the border router.
 13. The medium of claim 10,wherein the operations for performing the comparison of the firstlatency and the second latency further comprise: comparing an inboundlatency of the first transit provider to an inbound latency of thesecond transit provider; and comparing an outbound latency of the firsttransit provider to an outbound latency of the second transit provider.14. The medium of claim 10, wherein the operations for selecting the oneof the first transit provider and the second transit provider furthercomprise: selecting the one of the first transit provider and the secondtransit provider based on a cost of the first transit provider and acost of the second transit provider.
 15. The medium of claim 10, whereinthe operations for selecting the one of the first transit provider andthe second transit provider further comprise: selecting the one of thefirst transit provider and the second transit provider based on a packetloss of the first transit provider and a packet loss of the secondtransit provider.
 16. The medium of claim 10, wherein the operations fordirecting the traffic to the IP address further comprise: associating ahost prefix of a packet with a Border Gateway Protocol (BGP) communityattribute; and directing the packet to the one of the first transitprovider and the second transit provider based on the BGP communityattribute of the host prefix.
 17. The medium of claim 10, wherein theoperations for directing the traffic to the IP address further comprise:setting a next hop for traffic destined to the IP address to be a borderrouter coupled to the one of the first transit provider and the secondtransit provider.
 18. A non-transitory computer readable medium storinginstructions which, when executed by one or more hardware processors,cause performance of operations for directing traffic from a customerpremises to an Internet Protocol (IP) address among a plurality oftransit providers, the operations comprising: measuring a first latencyon a first path from a collector device at the customer premises to theIP address, wherein the first path comprises a first transit provider inthe plurality of transit providers and a first interface on a borderrouter coupled to the first transit provider and the second transitprovider; measuring a second latency on a second path from the collectordevice to the IP address, wherein the second path comprises a secondtransit provider in the plurality of transit providers and a secondinterface on the border router; performing a comparison of the firstlatency and the second latency; selecting the second transit providerbased on the comparison of the first latency and the second latency; anddirecting traffic from the customer premises to the IP address via thesecond transit provider, wherein directing the traffic to the IP addresscomprises directing the traffic to the second transit provider via thesecond interface on the border router.
 19. A system, comprising: atleast one device including a hardware processor; and the system beingconfigured to perform operations for directing traffic from a customerpremises to an Internet Protocol (IP) address among a plurality oftransit providers, the operations comprising: measuring a first latencyon a first path from a collector device at the customer premises to theIP address, wherein the first path comprises a first transit provider inthe plurality of transit providers and a first border router coupled tothe first transit provider; measuring a second latency on a second pathfrom the collector device to the IP address, wherein the second pathcomprises a second transit provider in the plurality of transitproviders, a second border router, and the first border router;performing a comparison of the first latency and the second latency;selecting the second transit provider based on the comparison of thefirst latency and the second latency; and directing traffic from thecustomer premises to the IP address, wherein directing the traffic tothe IP address comprises directing the traffic to the second transitprovider on the second path via the first border router and the secondborder router.
 20. A system, comprising: at least one device including ahardware processor; and the system being configured to performoperations for directing traffic from a customer premises to an InternetProtocol (IP) address among a plurality of transit providers, theoperations comprising: measuring a first latency on a first path from acollector device at the customer premises to the IP address, wherein thefirst path comprises a first transit provider in the plurality oftransit providers and a first interface on a border router coupled tothe first transit provider and the second transit provider; measuring asecond latency on a second path from the collector device to the IPaddress, wherein the second path comprises a second transit provider inthe plurality of transit providers and a second interface on the borderrouter; performing a comparison of the first latency and the secondlatency; selecting the second transit provider based on the comparisonof the first latency and the second latency; and directing traffic fromthe customer premises to the IP address via the second transit provider,wherein directing the traffic to the IP address comprises directing thetraffic to the second transit provider via the second interface on theborder router.